window.XToolbar = [
    "undo",
    "redo",
    "|",
    "headings",
    "bold",
    "italic",
    "strike",
    {
        "name": "link",
        "tip": "链接",
        "tipPosition": "n",
        "data": {},
        click() {
            window.XEditor.paramsPrompt("link");
        }
    },
    "|",
    "list",
    "ordered-list",
    {
        "name": "task-no",
        "tip": "任务 - 未完成",
        "icon": "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\"><path d=\"M831.55 128.531c38.35 0 63.911 25.568 63.911 63.91v639.104c0 38.355-25.561 63.916-63.91 63.916H192.44c-38.34 0-63.908-25.56-63.908-63.916V192.442c0-38.343 25.567-63.91 63.908-63.91h639.11m0-63.91H192.44c-70.3 0-127.816 57.518-127.816 127.82v639.103c0 70.308 57.515 127.833 127.816 127.833h639.11c70.294 0 127.822-57.525 127.822-127.833V192.442c0-70.302-57.527-127.82-127.823-127.82zm0 0\"/></svg>",
        "tipPosition": "n",
        click() {
            window.XEditor.replaceSelection("[ ]%s".replace("%s", window.XEditor.getSelection()));
        }
    },
    {
        "name": "task-yes",
        "tip": "任务 - 已完成",
        "icon": "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\"><path d=\"M831.551 64.623h-639.11c-70.3 0-127.816 57.517-127.816 127.819v639.103c0 70.308 57.515 127.833 127.816 127.833h639.11c70.294 0 127.822-57.525 127.822-127.833V192.442c0-70.302-57.527-127.82-127.822-127.82zM646.217 486.44c-108.652 159.779-204.52 345.115-204.52 345.115L192.443 550.351l63.916-70.303 153.385 146.994s76.695-127.822 178.95-236.469c102.261-108.652 223.689-198.127 223.689-198.127l19.17 63.916c0-.001-102.255 108.646-185.337 230.078z\"/></svg>",
        "tipPosition": "n",
        click() {
            window.XEditor.replaceSelection("[x]%s".replace("%s", window.XEditor.getSelection()));
        }
    },
    "|",
    "quote",
    "line",
    "inline-code",
    "code",
    "table",
    {
        "name": "html",
        "tip": "HTML代码",
        "tipPosition": "n",
        "icon": "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"><path d=\"M128 64l69.8 791.6L511 960l315.2-104.4L896 64H128zm616.4 255.8H376.8l8.2 98.8h351.2L709 715.4l-195.8 54v.6H511l-197.4-54.6-12-151.6H397l7 76.2 107 29 107.4-29 12-124.4H296.6L271 224.4h482.2l-8.8 95.4z\"/></svg>",
        click() {
            window.XEditor.replaceSelection("!!!\n%s\n!!!".replace("%s", window.XEditor.getSelection("这里输入HTML代码")).replace("\n\n", "\n"));
        }
    },
    "|",
    {
        "name": "x-title",
        "tip": "居中标题",
        "icon": "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"><path d=\"M967.1 455.3H672.2c-23.5-66.1-86-113.8-160.2-113.8s-136.7 47.6-160.2 113.8H56.9C25.5 455.3 0 480.7 0 512.2c0 31.4 25.5 56.9 56.9 56.9h294.9c23.5 66.1 86 113.8 160.2 113.8s136.7-47.6 160.2-113.8h294.9c31.4 0 56.9-25.5 56.9-56.9 0-31.5-25.5-56.9-56.9-56.9zM512 569.1c-31.4 0-56.9-25.5-56.9-56.9s25.5-56.9 56.9-56.9 56.9 25.5 56.9 56.9c0 31.3-25.5 56.9-56.9 56.9z\"/></svg>",
        "tipPosition": "n",
        "preview": "<div class='shortcode shortcode-x-title'><span>$5</span></div>",
        click() {
            window.XEditor.replaceSelection("[x-title]%s[/x-title]".replace("%s", window.XEditor.getSelection()));
        }
    },
    {
        "name": "image",
        "tip": "外链图片",
        "icon": "<svg t=\"1624105839871\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"3882\" width=\"20\" height=\"20\"><path d=\"M150.4 257h658.2v146h46V211H104.4v515.3h375.1v-46H150.4z\" p-id=\"3883\"></path><path d=\"M239.2 393.1c0 44.8 36.7 81.3 81.8 81.3s81.8-36.5 81.8-81.3-36.7-81.3-81.8-81.3-81.8 36.4-81.8 81.3z m117.6 0c0 19.5-16.1 35.3-35.8 35.3s-35.8-15.8-35.8-35.3 16.1-35.3 35.8-35.3 35.8 15.8 35.8 35.3zM670.5 400.6c21.7 0 42.7 4.1 62.6 12.1l17.2-42.7c-25.4-10.2-52.2-15.4-79.8-15.4-57.1 0-110.7 22.2-151.1 62.6-36.6 36.6-58.3 84.2-62 135.3-21.1-6.3-43-9.5-65.5-9.5-70.6 0-136.1 31.9-179.7 87.6l36.2 28.4c34.8-44.4 87.1-69.9 143.5-69.9 26.9 0 52.7 5.7 76.9 17 7.8 3.7 17.1 2.9 24.2-2.1 7.1-4.9 11.1-13.3 10.4-22-0.4-4.6-0.6-9.2-0.6-13.7 0-92.5 75.2-167.7 167.7-167.7z\" p-id=\"3884\"></path><path d=\"M737.3 448.6c-100.5 0-182.2 81.7-182.2 182.2S636.9 813 737.3 813c100.5 0 182.2-81.7 182.2-182.2s-81.7-182.2-182.2-182.2z m0 318.4c-75.1 0-136.2-61.1-136.2-136.2s61.1-136.2 136.2-136.2 136.2 61.1 136.2 136.2c0.1 75.1-61.1 136.2-136.2 136.2z\" p-id=\"3885\"></path><path d=\"M760.3 560.8h-46v47h-47v46h47v47h46v-47h47v-46h-47z\" p-id=\"3886\"></path></svg>",
        "tipPosition": "n",
        "template": "![{title}]({url})\n",
        "params":
            {
                "url": {
                    "label": "图片连接",
                    "placeholder": "输入外链图片连接",
                    "required": true
                },
                "title": {
                    "label": "图片描述",
                    "placeholder": "输入图片描述",
                },
            },
        click() {
            window.XEditor.paramsPrompt('image');
        }
    },
    {
        "name": "photos",
        "tip": "相册",
        "icon": "<svg t=\"1619339458977\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"2297\" width=\"20\" height=\"20\"><path d=\"M725.333333 938.666667H170.666667c-46.933333 0-85.333333-38.4-85.333334-85.333334V298.666667c0-25.6 17.066667-42.666667 42.666667-42.666667s42.666667 17.066667 42.666667 42.666667v512c0 21.333333 17.066667 42.666667 42.666666 42.666666h512c21.333333 0 42.666667 17.066667 42.666667 38.4v4.266667c0 21.333333-17.066667 42.666667-42.666667 42.666667z m-366.933333-170.666667C302.933333 768 256 721.066667 256 665.6V187.733333C256 132.266667 302.933333 85.333333 358.4 85.333333h477.866667C891.733333 85.333333 938.666667 132.266667 938.666667 187.733333v477.866667c0 55.466667-46.933333 102.4-102.4 102.4H358.4z m81.066667-85.333333H810.666667c21.333333-4.266667 38.4-21.333333 42.666666-42.666667v-128l-119.466666-106.666667-294.4 277.333334zM384 298.666667c0 46.933333 38.4 85.333333 85.333333 85.333333s85.333333-38.4 85.333334-85.333333-38.4-85.333333-85.333334-85.333334-85.333333 38.4-85.333333 85.333334z\" p-id=\"2298\"></path></svg>",
        "tipPosition": "n",
        "preview": "<photos$3>$5</photos>",
        click() {
            window.XEditor.replaceSelection("[photos]\n%s\n[/photos]".replace("%s", window.XEditor.getSelection()).replace("\n\n", "\n"));
        }
    },
    {
        "name": "x-post",
        "tip": "引用文章",
        "tipPosition": "n",
        "icon": "<svg t=\"1620054605685\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"9679\" width=\"20\" height=\"20\"><path d=\"M896 341.333333h-159.274667l30.549334-162.773333-83.84-15.744L649.898667 341.333333h-211.882667l30.549333-162.773333-83.797333-15.786667L351.232 341.333333H170.666667v85.333334h164.565333l-32.042667 170.666666H128v85.333334h159.189333l-30.464 162.346666 83.84 15.744L374.016 682.666667h211.882667l-30.464 162.346666 83.84 15.744 33.408-178.090666H853.333333v-85.333334h-164.650666l32.042666-170.666666H896V341.333333z m-294.144 256H390.016l32.042667-170.666666h211.882666l-32.085333 170.666666z\" fill=\"\" p-id=\"9680\"></path></svg>",
        "template": "[x-post cover='{cover}' link='{link}']{cid}[/x-post]\n",
        "preview": "<x-post$3>$5</x-post>",
        "previewArea": "f",
        "params":
            {
                "cid": {
                    "label": "文章cid",
                    "placeholder": "输入文章cid",
                },
            },
        click() {
            window.XEditor.paramsPrompt('x-post');
        }
    },
    {
        "name": "x-card",
        "tip": "卡片",
        "tipPosition": "n",
        "icon": "<svg t=\"1620111652676\" class=\"icon\" viewBox=\"0 0 1157 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"2058\" width=\"20\" height=\"20\"><path d=\"M1.923005 0v1023.038498h1153.802817V0z m1057.652582 96.150235v192.300469h-961.502348V96.150235z m-961.502348 830.738028V382.677934h961.502348v544.210329z\" p-id=\"2059\"></path><path d=\"M153.840376 661.513615h362.486385v96.150235H153.840376z\" p-id=\"2060\"></path></svg>",
        "template": "[x-card title='{title}' fold='{fold}']{content}[/x-card]\n",
        "preview": "<x-card$3>$5</x-card>",
        "previewArea": "f",
        "params":
            {
                "title": {
                    "label": "标题",
                    "default": "卡片标题",
                    "placeholder": "输入标题",
                },
                "content": {
                    "label": "内容",
                    "tag": "textarea",
                    "default": "卡片内容",
                    "placeholder": "输入内容",
                },
                "fold": {
                    "tag": "select",
                    "label": "折叠",
                    "default": "off",
                    "options": {
                        "off": "默认展开",
                        "on": "默认折叠"
                    }
                }
            },
        click() {
            window.XEditor.paramsPrompt('x-card');
        }
    },
    "|",
    {
        "name": "character",
        "tip": "实体符号",
        "tipPosition": "n",
        "icon": "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"><path d=\"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z\"/><path d=\"M517.6 351.3c53 0 89 33.8 93 83.4.3 4.2 3.8 7.4 8 7.4h56.7c2.6 0 4.7-2.1 4.7-4.7 0-86.7-68.4-147.4-162.7-147.4C407.4 290 344 364.2 344 486.8v52.3C344 660.8 407.4 734 517.3 734c94 0 162.7-58.8 162.7-141.4 0-2.6-2.1-4.7-4.7-4.7h-56.8c-4.2 0-7.6 3.2-8 7.3-4.2 46.1-40.1 77.8-93 77.8-65.3 0-102.1-47.9-102.1-133.6v-52.6c.1-87 37-135.5 102.2-135.5z\"/></svg>",
        click() {
            window.XEditor.charTabPrompt('符号大全', 'character');
        }
    },
    {
        "name": "emoji",
        "tip": "符号表情",
        "tipPosition": "n",
        "icon": "<svg t=\"1620054362869\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"2368\" width=\"20\" height=\"20\"><path d=\"M513.999 962c-247.039 0-448-200.958-448-448s200.99-448.001 448-448.001c247.007 0 448.001 200.96 448.001 448S761.04 962 513.999 962z m0-832c-211.744 0-384 172.255-384 384s172.255 384 384 384c211.743 0 384-172.256 384-384s-172.256-384-384-384z m1.056 645.343c-89.184 0-171.903-40.32-226.912-110.623-10.88-13.92-8.448-34.017 5.473-44.897 13.888-10.911 34.016-8.48 44.927 5.472 42.784 54.689 107.136 86.049 176.512 86.049 70.111 0 134.88-31.904 177.664-87.552 10.785-14.016 30.85-16.672 44.864-5.89 14.016 10.786 16.673 30.881 5.888 44.865-55.008 71.551-138.27 112.575-228.416 112.575v0.001z m-144-258.143c-26.529 0-48-21.472-48-48v-64c0-26.527 21.472-48 48-48s48 21.473 48 48v64c0 26.495-21.505 48-48 48z m288 0c-26.496 0-48-21.472-48-48v-64c0-26.527 21.505-48 48-48s47.999 21.473 47.999 48v64c0 26.495-21.503 48-48 48z\" p-id=\"2369\"></path></svg>",
        click() {
            window.XEditor.charTabPrompt('符号表情（需要数据库支持）', 'emoji');
        }
    },
    {
        "name": "expression",
        "tip": "图片表情",
        "tipPosition": "n",
        "icon": "<svg t=\"1620054828116\" class=\"icon\" viewBox=\"0 0 1025 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"12847\" width=\"20\" height=\"20\"><path d=\"M512.001664 1024C229.238048 1024 0.001664 794.763648 0.001664 512 0.001664 229.236352 229.238048 0 512.001664 0 794.765312 0 1024.001664 229.236352 1024.001664 512 1024.001664 794.763648 794.765312 1024 512.001664 1024ZM512.001664 64C264.571264 64 64.001664 264.5696 64.001664 512 64.001664 759.4304 264.571264 960 512.001664 960 759.432064 960 960.001664 759.4304 960.001664 512 960.001664 264.5696 759.432064 64 512.001664 64ZM401.345664 782.24C448.769664 800.896 501.217664 801.344 548.993664 783.52 596.705664 765.728 658.081664 731.328 681.377664 686.56 691.521664 666.976 698.241664 657.728 717.921664 667.776 737.601664 677.888 740.577664 691.328 730.401664 710.88 697.985664 773.184 643.553664 821.12 577.217664 845.856 544.769664 857.952 510.785664 864 476.833664 864 441.185664 864 406.017664 856.128 371.777664 844.064 350.561664 836.576 327.713664 794.56 339.201664 770.752 348.769664 750.88 380.769664 774.112 401.345664 782.24ZM584.776064 304.555168C555.23312 314.995424 538.470304 318.686112 512.004672 318.686112 481.66512 318.686112 459.37488 314.80768 419.043616 304.364672 413.900288 303.030016 401.38432 299.809664 398.17712 299.013984 368.017632 291.531808 345.520352 288 320.001664 288 178.508704 288 130.431616 297.83168 128.523616 349.505344 128.528576 352.001184 128.523616 417.946528 134.623808 439.344608 153.3024 504.864992 216.077984 543.232 320.001664 543.232 387.378944 543.232 432.442176 524.36064 470.709728 488.72368 477.84608 482.077888 509.811872 451.386816 512.108192 451.379392 512.17872 451.379168 531.49456 480.652192 536.24912 486.177632 568.58464 523.756032 619.221344 543.232 704.001664 543.232 799.174176 543.232 857.726464 505.707392 882.649408 442.870464 893.405792 415.750944 895.978688 392.948672 895.9776 360.856128 895.9776 299.342304 828.487776 281.364192 704.001664 281.364192 660.625824 281.364192 588.509312 303.231712 584.776064 304.555168ZM831.9776 360.574464C831.978432 385.424608 830.14736 401.652544 823.157984 419.274464 808.167808 457.068416 773.584416 479.232 704.001664 479.232 636.624832 479.232 603.861312 466.630464 584.76144 444.433696 581.92576 441.13824 569.168672 422.133984 567.122496 419.173504 552.868448 398.550112 536.858464 387.298976 511.901152 387.379744 491.433024 387.445952 475.074016 395.497888 458.759456 410.193568 452.897504 415.473824 432.257568 437.0784 427.093312 441.88768 400.32944 466.811776 370.670976 479.232 320.001664 479.232 242.406752 479.232 207.468512 457.045312 195.586784 419.863456 190.644064 404.396032 189.525056 361.769312 192.237376 360.93568 194.506944 360.238144 261.100448 352 320.001664 352 339.432224 352 357.212384 354.791264 382.766688 361.130976 385.756544 361.872704 397.80144 364.97216 403.00112 366.32144 448.151744 378.01232 475.013184 382.686112 512.004672 382.686112 546.967456 382.686112 570.305792 377.54768 606.100768 364.897984 609.963872 363.528512 669.042976 345.364192 704.001664 345.364192 787.940896 345.364192 831.9776 357.094816 831.9776 360.574464Z\" p-id=\"12848\"></path></svg>",
        click() {
            window.XEditor.owoTabPrompt('图片表情', 'expression');
        }
    },
    "|",
    {
        "name": "x-player",
        "tip": "引用m3u8/mp4",
        "tipPosition": "n",
        "icon": "<svg t=\"1620054439293\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"4461\" width=\"20\" height=\"20\"><path d=\"M887.232 69.504H130.56a62.976 62.976 0 0 0-62.912 62.912v757.504c0 34.624 28.224 62.784 62.912 62.784h756.672c34.688 0 62.912-28.16 62.912-62.784V132.416a62.976 62.976 0 0 0-62.912-62.912zM122.88 255.168h772.032v519.68H122.88v-519.68z m7.68-130.368h756.672a7.68 7.68 0 0 1 7.68 7.616v67.456H122.88V132.416a7.68 7.68 0 0 1 7.68-7.616z m756.672 772.672H130.56a7.68 7.68 0 0 1-7.68-7.552v-59.84h772.032v59.904a7.68 7.68 0 0 1-7.68 7.488z\" p-id=\"4462\"></path><path d=\"M673.28 487.168L452.032 359.488a27.712 27.712 0 0 0-41.408 23.936v255.488a27.648 27.648 0 0 0 27.584 27.648h0.064a27.072 27.072 0 0 0 13.888-3.776l221.12-127.68a27.584 27.584 0 0 0 0.192-47.808l-0.192-0.128zM465.856 591.04V431.232L604.16 511.104 465.856 591.04z\" p-id=\"4463\"></path></svg>",
        "template": "[x-player src='{src}' /]\n",
        "preview": "<x-player$3>$5</x-player>",
        "params":
            {
                "src": {
                    label: "视频链接",
                    required: true
                },
            },
        click() {
            window.XEditor.paramsPrompt('x-player');
        }
    },
    {
        "name": "x-bilibili",
        "tip": "引用B站视频",
        "tipPosition": "n",
        "icon": "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\"><path d=\"M1023.488 344.064c-3.072-143.36-128-170.496-128-170.496s-97.28-.512-224.256-1.536l92.16-89.088s14.336-18.432-10.24-38.912-26.624-11.264-34.816-6.144c-7.68 5.632-117.76 113.664-137.216 133.12-50.176 0-102.4-.512-153.088-.512h17.92s-132.096-130.56-140.8-136.192-9.728-14.336-34.816 6.144c-24.576 20.48-10.24 38.912-10.24 38.912l94.208 91.648c-102.4 0-190.464.512-231.424 2.048C-9.728 210.944.512 344.064.512 344.064s1.536 285.696 0 429.568c14.336 144.384 125.44 167.424 125.44 167.424s44.032 1.024 76.8 1.024c3.072 9.216 6.144 54.272 56.32 54.272s56.32-54.272 56.32-54.272 369.152-1.536 399.872-1.536c1.536 15.872 9.216 57.344 59.904 56.32 50.176-1.024 53.76-59.904 53.76-59.904s17.408-1.536 68.608 0C1017.344 914.944 1024 774.656 1024 774.656s-2.048-287.232-.512-430.592zM920.576 800.768c0 22.528-17.92 40.96-39.936 40.96H153.6c-22.016 0-39.936-18.432-39.936-40.96V318.464c0-22.528 17.92-40.96 39.936-40.96h727.04c22.016 0 39.936 18.432 39.936 40.96v482.304z\"/><path d=\"M403.968 414.208l-214.016 40.96 18.432 80.384 211.456-40.96-15.872-80.384zm115.2 212.48c-52.224 112.128-99.328 27.648-99.328 27.648l-34.816 22.528s69.12 94.208 134.656 22.528c77.312 71.68 136.704-23.04 136.704-23.04l-31.744-20.48c0-.512-55.808 79.872-105.472-29.184zM624.64 494.08l211.968 40.96 17.92-80.384-213.504-40.96-16.384 80.384z\"/></svg>",
        "template": "[x-bilibili bvid='{bvid}' /]\n",
        "preview": "<x-bilibili$3>$5</x-bilibili>",
        "params":
            {
                "bvid": {
                    label: "视频ID(bvid)",
                    required: true
                },
            },
        click() {
            window.XEditor.paramsPrompt('x-bilibili');
        }
    },
    {
        "name": "x-netease",
        "tip": "引用网易云音乐",
        "tipPosition": "n",
        "icon": "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"><path d=\"M837.766 364.816c-50.828-54.107-111.313-91.2-187.245-98.706-7.324-.728-18.983-5.028-20.404-9.983-6.595-23.064-12.826-46.784-14.283-70.54-1.64-26.6 20.368-44.744 46.748-39.425 16.724 3.389 32.392 12.389 48.277 19.457 10.968 4.883 20.988 12.389 32.32 15.923 27.472 8.49 53.378-7.725 58.589-35.78 4.408-23.684-4.41-42.922-22.154-58.153-28.857-24.776-62.998-37.748-100.054-44.743-70.977-13.409-152.74 38.768-169.648 108.908-8.453 35.088-1.712 68.755 10.457 101.51 6.486 17.527 1.968 24.595-16.032 30.862-118.308 41.32-182.508 155.436-154.49 276.075 16.506 71.123 59.465 121.733 131.862 138.604 74.44 17.344 136.818-7.943 182.62-69.192 37.056-49.516 39.133-105.519 23.976-163.197-7.943-30.242-17.198-60.156-26.672-92.948 5.575 1.094 7.397 1.203 9.037 1.786 125.486 45.436 188.959 183.858 125.232 318.813-63.91 135.325-211.911 183.348-344.362 155.072-166.26-35.526-278.955-210.93-245.286-377.62 23.61-116.924 91.564-198.32 200.253-246.342 8.27-3.68 16.797-7.251 24.266-12.28 15.595-10.53 24.886-25.687 23.064-44.633-1.93-19.93-11.878-37.93-32.136-42.011-16.215-3.28-36.036-3.68-50.72 2.696-166.223 72.107-260.848 197.994-272.869 379.884-18.655 282.566 246.128 504.023 521.296 440.882 171.833-39.424 293.167-182.18 303.986-330.804 7.105-97.248-18.619-182.763-85.625-254.11zm-309.05 234.651c-39.06 3.352-71.233-23.83-77.609-65.548-11.113-72.545 19.894-127.162 85.48-151.94 12.606-4.774 18.18-2.915 21.934 10.858 8.745 32.1 19.493 63.617 28.675 95.609 3.133 10.93 3.972 22.554 5.83 33.885-.219 42.922-25.578 73.82-64.31 77.136z\"/></svg>",
        "template": "[x-netease type='{type}' id='{id}' autoplay='{autoplay}' /]\n",
        "preview": "<x-netease$3>$5</x-netease>",
        "params":
            {
                "type": {
                    "label": "类型",
                    "tag": 'select',
                    "options": {
                        "song": "单曲",
                        "list": "歌单"
                    }
                },
                "id": {
                    "label": "歌曲/歌单ID",
                    "required": true
                },
                "autoplay": {
                    "label": "自动播放",
                    "tag": "select",
                    "value": "off",
                    "options": {
                        "off": "关闭",
                        "autoplay": "开启"
                    }
                }
            },
        click() {
            window.XEditor.paramsPrompt('x-netease');
        }
    },
    {
        "name": "x-btn",
        "tip": "插入按钮",
        "tipPosition": "n",
        "icon": "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\" width=\"22\" height=\"22\"><path d=\"M856.73 796.7h-690c-57.9 0-105-47.1-105-105v-360c0-57.9 47.1-105 105-105h690c57.9 0 105 47.1 105 105v360c0 57.89-47.1 105-105 105zm-690-500.01c-19.3 0-35 15.7-35 35v360c0 19.3 15.7 35 35 35h690c19.3 0 35-15.7 35-35v-360c0-19.3-15.7-35-35-35h-690z\"/><path d=\"M233.16 431.69H790.3v160H233.16z\"/></svg>",
        "template": "[x-btn type='{type}' icon='{icon}' href='{href}' content='{content}' /]\n",
        "preview": "<x-btn$3>$5</x-btn>",
        "previewArea": "c",
        "params":
            {
                "type": {
                    "label": "按钮类型",
                    "tag": 'select',
                    "options": {
                        "primary": "primary",
                        "secondary": "secondary",
                        "light": "light",
                        "dark": "dark",
                        "info": "info",
                        "success": "success",
                        "warning": "warning",
                    }
                },
                "icon": {
                    "label": "<a href='https://fontawesome.dashgame.com/' target='_blank' title='点此查找图标Class'>按钮图标</a>",
                },
                "href": {
                    "label": "按钮链接",
                    "required": true
                }
                ,
                "content": {
                    "label": "按钮文字",
                    "default": "按钮",
                }
            },
        click() {
            window.XEditor.paramsPrompt('x-btn');
        }
    },
    "|",
    {
        "name": "markdownToggle",
        "tip": "Markdown开关",
        "tipPosition": "n",
        "icon": "<svg t=\"1620130978050\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"2000\" width=\"20\" height=\"20\"><path d=\"M128 128h768a42.666667 42.666667 0 0 1 42.666667 42.666667v682.666666a42.666667 42.666667 0 0 1-42.666667 42.666667H128a42.666667 42.666667 0 0 1-42.666667-42.666667V170.666667a42.666667 42.666667 0 0 1 42.666667-42.666667z m42.666667 85.333333v597.333334h682.666666V213.333333H170.666667z m128 448H213.333333v-298.666666h85.333334l85.333333 85.333333 85.333333-85.333333h85.333334v298.666666h-85.333334v-170.666666l-85.333333 85.333333-85.333333-85.333333v170.666666z m469.333333-128h85.333333l-128 128-128-128h85.333334v-170.666666h85.333333v170.666666z\" p-id=\"2001\"></path></svg>",
        click() {
            if (!$("div.message.notice").html()) {
                let isMarkdown = $('[name=markdown]').val() ? $('[name=markdown]').val() : 0;
                if (isMarkdown == 1) {
                    let notice = $(`<div class="message notice">${XConf.i18n.XMarkdown.enabled}
                    <button class="btn btn-xs no">${XConf.i18n.XMarkdown.disable}</button> 
                    <button class="btn btn-xs primary yes">${XConf.i18n.XMarkdown.keepEnabled}</button></div>`)
                        .hide().insertBefore($('#text').parent('p')).slideDown();

                    $('.yes', notice).click(function () {
                        notice.remove();
                    });

                    $('.no', notice).click(function () {
                        notice.remove();
                        $("[name=markdown]").val(0);
                    });
                } else {
                    let notice = $(`<div class="message notice">${XConf.i18n.XMarkdown.disabled}
                    <button class="btn btn-xs primary yes">${XConf.i18n.XMarkdown.enable}</button>
                    <button class="btn btn-xs no">${XConf.i18n.XMarkdown.keepDisabled}</button></div>`)
                        .hide().insertBefore($('#text').parent('p')).slideDown();

                    $('.yes', notice).click(function () {
                        notice.remove();
                        if (!$("[name=markdown]").val())
                            $('<input type="hidden" name="markdown" value="1" />').appendTo('.submit');
                        else
                            $("[name=markdown]").val(1);
                    });

                    $('.no', notice).click(function () {
                        notice.remove();
                    });
                }
            }

        }
    },
    "fullscreen",
    {
        "name": "about",
        "tip": "关于 XEditor",
        "tipPosition": "n",
        "icon": "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"><path d=\"M881.6 512.1c0 203.7-165.7 369.5-369.5 369.5S142.6 715.8 142.6 512.1s165.7-369.5 369.5-369.5 369.5 165.8 369.5 369.5m77.7 0c0-246.6-200.6-447.2-447.2-447.2S64.9 265.5 64.9 512.1s200.6 447.2 447.2 447.2 447.2-200.6 447.2-447.2M582.5 318.2c9-9 14.2-21.6 14.2-34.3 0-12.8-5.2-25.4-14.2-34.4s-21.6-14.2-34.4-14.2c-12.7 0-25.3 5.2-34.3 14.2-9.1 9-14.3 21.6-14.3 34.4 0 12.7 5.2 25.3 14.3 34.3 9 9 21.5 14.3 34.3 14.3s25.3-5.3 34.4-14.3m-96.6 464.3c-7.6 0-15.2-2.6-21.3-7.5-9.9-7.9-14.5-20.7-12.1-33.1l47.9-243.1-26.4 14.8c-16.4 9.2-37.1 3.4-46.3-13-9.2-16.4-3.4-37.1 12.9-46.3l90.7-51.1c11.6-6.5 25.9-5.7 36.6 2.1 10.8 7.8 16 21.1 13.4 34.1l-49.6 251.9 40.7-17.7c17.2-7.5 37.3.4 44.8 17.6 7.5 17.2-.4 37.3-17.6 44.8l-100.2 43.7c-4.3 1.9-8.9 2.8-13.5 2.8\"/></svg>",
        "html": "<ul><li>本编辑其基于 vditor 构建</li><li>短代码功能正在开发中...</li><li>仅用于<a href='https://doufu.ru' target='_blank'>虾米皮皮乐开发</a>的主题，未经允许请勿移植</li></ul>",
        click() {
            window.XEditor.htmlDialog("about");
        }
    }
]